package com.yaohe.consumer.network;

import java.net.MalformedURLException;
import java.net.URL;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.Log;

public class ConnectionJudge {
	
	public static boolean doPing(){
		try{
			Process p = Runtime.getRuntime().exec("ping -c 1 www.g.cn");
			int status = p.waitFor();

			Log.d("YaoheService","status:" + status);
			if(status == 0){
				return true;
			}else{
				return false;
			}
		}catch(Exception ex){
			return false;
		}
	}
}
